package com.example.daliy.proxy;

import java.lang.reflect.Proxy;

public class MyProxy {
    public static void main(String[] args) {
        ReadImpl readImpl = new ReadImpl();
        Read read = (Read) Proxy.newProxyInstance(readImpl.getClass().getClassLoader(), readImpl.getClass().getInterfaces(), new MyInvocationHandler(readImpl));
        read.read();
    }
}
